package com.jjiang.bbmall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jjiang.bbmall.order.vo.OrderConfirmVo;
import com.jjiang.bbmall.order.vo.OrderSubmitVo;
import com.jjiang.bbmall.order.vo.SubmitOrderResponseVo;
import com.jjiang.common.to.SeckillOrderTo;
import com.jjiang.common.utils.PageUtils;
import com.jjiang.bbmall.order.entity.OrderEntity;

import java.util.Map;

/**
 * 订单
 *
 * @author jingjiang
 * @email 1259029328@qq.com
 * @date 2022-11-01 18:11:25
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 返回订单的确认Vo
     *
     * @return
     */
    OrderConfirmVo confirmOrder();

    SubmitOrderResponseVo submitOrder(OrderSubmitVo orderSubmitVo);

    OrderEntity getOrderByOrderSn(String orderSn);

    Boolean closeOrder(OrderEntity entity);

    PageUtils queryPageWithItem(Map<String, Object> params);

    /**
     * 无需支付的处理订单方法【简洁版本】
     *
     * @param orderSn
     * @return
     */
    Boolean handlePayResult(String orderSn);

    Boolean createSeckillOrder(SeckillOrderTo seckillOrderTo);
}

